package com.example.demo.news.repository;

import com.example.demo.news.bean.NewsBean;
import com.example.demo.news.bean.NewsType;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface NewsRepository extends JpaRepository<NewsBean,Long>{

    Page<NewsBean> findAllByNewsType(Pageable pageable, NewsType newsType);

}
